package cn.edu.sgu.www.mhxysy.mapper.chongwu;

import cn.edu.sgu.www.mhxysy.entity.chongwu.ChongwuSkill;
import cn.edu.sgu.www.mhxysy.vo.chongwu.ChongwuSkillVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Repository
public interface ChongwuSkillMapper extends BaseMapper<ChongwuSkill> {

    /**
     * 通过宠物ID修改宠物技能位置-1
     * @param chongwuId 宠物ID
     */
    void decreaseLocations(@Param("chongwuId") String chongwuId);

    /**
     * 通过宠物ID修改宠物指定位置之前的技能位置+1
     * @param chongwuId 宠物ID
     * @param location 位置
     */
    void increaseLocations(
            @Param("chongwuId") String chongwuId,
            @Param("location") int location
    );

    /**
     * 通过宠物ID查询宠物技能
     * @param chongwuId 宠物ID
     * @return List<ChongwuSkillVO>
     */
    List<ChongwuSkillVO> getLearnedSkills(@Param("chongwuId") String chongwuId);

    /**
     * 查询宠物可认证的技能
     * @param chongwuId 宠物ID
     * @return List<ChongwuSkill>
     */
    List<ChongwuSkill> getCanAuthedSkills(@Param("chongwuId") String chongwuId);
}